package com.lwh.springboot.mapper;

import com.lwh.springboot.pojo.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

// IUserDao
public interface UserMapper {

    List<User> selectAll();

    void deleteById(Integer id);

    void add(User user);

    User selectById(Integer id);

    void update(User user);

    User login(String name, String password);

    List<User> selectByPage(int offset, Integer pageSize, @Param("name")String name, @Param("phone")String phone, @Param("status")Integer status);

    int selectTotalCount(@Param("name")String name, @Param("phone")String phone, @Param("status")Integer status);

    void deleteAll(Integer[] ids);

    List<User> selectByPageById(int offset, Integer pageSize, @Param("id") Integer id);

    int selectTotalCountById(Integer id);

    boolean regist(User user);

}
